/*
 * File:   main.c
 * Author: diego
 *
 * Created on August 17, 2010, 10:46 PM
 */
#include <stdio.h>
#include <stdlib.h>
#include "lex.yy.h"
#include "symbol_table.h"
#include "y.tab.h"

extern int running;
extern symbol_table* table;
int yyparse(void);

int main(int argc, char ** argv)
{
    initMe();
    int token;

    yyin = fopen(argv[1], "r");
    if (!yyin) {
        printf("Uso: %s <input_file>. Could not find %s. Try again!\n", argv[0], argv[1]);
        exit(-1);
    }

    if (!yyparse()) {
	//print_symbol_table(*table);
        exit(0);
    } else {
        exit(3);
    }

    fclose(yyin);
    return 0;
}
